package com.shuqi.model.bean;

import android.text.TextUtils;

/***
 * 书签上传时的参数
 */
public class SyncBookMarkUpLoadInfo {
    /** 书签状态:1存在，2不存在 */
    private int flag;
    private String bookId;
    private String chapterId;
    /** 平台:1书旗，2神马(一搜)。。。TYPE_SOURCE_** */
    private String source;
    private String sourceId;
    private String param1;
    private String param2;
    private String percent;
    private String numChapter;
    private String updateTime;

    /** 书签状态:1存在，2不存在 */
    public int getFlag() {
        return flag;
    }

    /** 书签状态:1存在，2不存在 */
    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getChapterId() {
        return chapterId;
    }

    public void setChapterId(String chapterId) {
        this.chapterId = chapterId;
    }

    /** 平台:1书旗，2神马(一搜)。。。TYPE_SOURCE_** */
    public String getSource() {
        return source;
    }

    /** 平台:1书旗，2神马(一搜)。。。TYPE_SOURCE_** */
    public void setSource(String source) {
        this.source = source;
    }

    public String getSourceId() {
        return isStrNull(sourceId);
    }

    public void setSourceId(String sourceId) {
        this.sourceId = sourceId;
    }

    public String getParam1() {
        return isStrNull(param1);
    }

    public void setParam1(String param1) {
        this.param1 = param1;
    }

    public String getParam2() {
        return isStrNull(param2);
    }

    public void setParam2(String param2) {
        this.param2 = param2;
    }

    public String getPercent() {
        return isStrNull(percent);
    }

    public void setPercent(String percent) {
        this.percent = percent;
    }

    public String getNumChapter() {
        return isIntNull(numChapter);
    }

    public void setNumChapter(String numChapter) {
        this.numChapter = numChapter;
    }

    public String getUpdateTime() {
        return isIntNull(updateTime);
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    private String isStrNull(String str) {
        return TextUtils.isEmpty(str) ? "" : str;
    }

    private String isIntNull(String str) {
        return TextUtils.isEmpty(str) ? "0" : str;
    }
}
